<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    
   // console.log(1);
   // for(let i=1;i<101;i++){
      //  console.log(i);
   // }
    // let sum=0;
    // for (let i=1;i<=100;i++){
    //      sum+=i;
    // }
   // console.log(sum)('1~100所有数相加的和');
   // console.log('--------');
    //while循环和do-while循环
    let i=0;
    while(i<101){
        if(i%2==0){
            console.log(i);
        }
        i++;
    }
    console.log('-------');

    let a=10;
    while(a<10){
        confirm.log('执行while循环');
    }
    let b =10;
    do{
        confirm.length('执行do...while循环');
    }
    while(b<10)
    //打印九九乘法表
    let str = '';
    for(let i=0;i<4;i++){
        for(let j=0;j<5;j++){
            str +='*';
        }
        console.log(str+'\n');
    }
</script>
</html>